﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="discussionforum.aspx.vb" Inherits="HauntedNetworkingSite.discussionforum" %>

<%@ Register src="Banner.ascx" tagname="Banner" tagprefix="uc1" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Discussion Forum</title>
    
    <link href="StyleSheet2.css" rel="stylesheet" type="text/css" />
    
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        </style>
</head>
<body>
    <form id="form1" runat="server">
    
    <div>
        <uc1:Banner ID="Banner1" runat="server" />
        <h1>
            &nbsp;</h1>
            <p style="margin-left: 440px">
        <br />
        <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Image ID="Image1" runat="server" Height="32px" ImageUrl="~/Images/rss.png" 
            Width="32px" />
        <asp:LinkButton ID="linkButton_Rss" runat="server" CssClass="bannerButtons" 
            Font-Size="XX-Large" PostBackUrl="~/DiscussionRss.aspx">RSS</asp:LinkButton>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="label_keepUp" runat="server" Text="Keep Up With The New"></asp:Label>
                    </p>
            <p style="margin-left: 1000px">
                <asp:Image ID="img_AddDiscussion" runat="server" 
                    ImageUrl="~/Images/Add.gif" />
                <asp:LinkButton ID="linkBtn_AddDiscussion" runat="server" 
                    CssClass="bannerButtons" Height="32px" PostBackUrl="~/AddDiscussion.aspx">Add Discussion</asp:LinkButton>
        <br />
                    </p>
                    <asp:GridView ID="GridView1" runat="server" 
            AutoGenerateColumns="False" DataSourceID="DiscussionForumDataSource" 
             Width="100%" AllowPaging="True" AllowSorting="True">
                        <Columns>
                            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                                DataNavigateUrlFormatString="DiscussionTopic.aspx?ID={0}" DataTextField="Topic" 
                                HeaderText="Topic" SortExpression="Topic" >
                                <ControlStyle CssClass="bannerButtons" />
                            </asp:HyperLinkField>
                            <asp:BoundField DataField="Tags" HeaderText="Tags" SortExpression="Tags" >
                                <HeaderStyle CssClass="bannerButtons" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Category_Title" HeaderText="Category" 
                                SortExpression="Category_Title" >
                                <HeaderStyle CssClass="bannerButtons" />
                            </asp:BoundField>
                            <asp:HyperLinkField DataNavigateUrlFields="StartedBy" 
                                DataNavigateUrlFormatString="ShowDiscussionsByUser.aspx?UserName={0}" 
                                DataTextField="StartedBy" HeaderText="Started By" 
                                SortExpression="StartedBy" >
                                <ControlStyle CssClass="bannerButtons" />
                            </asp:HyperLinkField>
                        </Columns>
                        <HeaderStyle BorderStyle="Double" CssClass="titleclass" />
                    </asp:GridView>
        <asp:SqlDataSource ID="DiscussionForumDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:PlacesConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:PlacesConnectionString.ProviderName %>" 
            SelectCommand="SELECT [Topic], [ID], [Body], [Tags], [Category Title] AS Category_Title, [StartedBy] FROM [discussionforumQuery]">
        </asp:SqlDataSource>
        <br />
        <table class="style1">
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <br />
                </td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
